package com.example.java.sort;

import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;

public class AAAApplicationListener implements ApplicationListener<ApplicationEvent> {

	@Override
	public void onApplicationEvent(ApplicationEvent event) {
		if(event instanceof AAAEvent){
			AAAEvent emailEvent = (AAAEvent)event;
			System.out.println("the source is:"+emailEvent.getSource());
			System.out.println("the email's context is:"+emailEvent.text);
		}
	}


 

}
